package edu.pku.taas.hyperic.types2;

import java.util.List;

import edu.pku.taas.hyperic.monitor.MonitorConstants;
public class Cloud {
	public static String NAME = "Cloud";
	protected String masterIP;
	protected String masterHostName;
	protected List<Cluster> clusters;
	protected List<Cluster> children;
	public static final int resourceType = MonitorConstants.RESOURCE_CLOUD_TYPE;
	
	private String name;
	private int type=1;
	public String getMasterIP() {
		return masterIP;
	}

	public void setMasterIP(String masterIP) {
		this.masterIP = masterIP;
	}

	public Cloud() {
		super();
	}

	public Cloud(String masterIP, String masterName, List<Cluster> clusters) {
		super();
		this.masterIP = masterIP;
		this.masterHostName = masterName;
		this.clusters = clusters;
		this.children = this.clusters;
	}

	public String getMasterName() {
		return masterHostName;
	}

	public void setMasterName(String masterName) {
		this.masterHostName = masterName;
	}

	public List<Cluster> getClusters() {
		return clusters;
	}

	public void setClusters(List<Cluster> clusters) {
		this.clusters = clusters;
		this.children = clusters;
	}

	public String getName() {
//		return name;
		return NAME + "("+getMasterName()+")";
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<Cluster> getChildren() {
		return children;
	}

	public void setChildren(List<Cluster> children) {
		this.clusters = children;
		this.children = children;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}
}
